package com.gooznt.wrapperProp;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

public class WrapperReader {

	private BufferedReader fr;

	public WrapperReader(String input){
		try {
			this.fr = new BufferedReader(new FileReader(input));
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		}
	}

	/**
	 * get the next line from the url's file (each line is a different url)
	 * @return the next url to be requested
	 */
	public String getNextLine(){
		String line = null;
		try {
			line = this.fr.readLine();
		} catch (IOException e) {
			e.printStackTrace();
		}
		return line;
	}
	
	public void closeFile(){
		try {
			this.fr.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
